home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / text0216.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  2.3 KB  |  62 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. Mush...
  7. your logic is a bit awry when you come to talking about your c2p stuff...
  8. when you say about POKEing the colours to your reserved data store, that is
  9. correct BUT then you say to COPY it to the screen, err, why not write to
  10. the screen directly... IF and thats a big IF, the Amiga even had a chunky
  11. screen :-)
  12. Thats the whole point of a c2p routine, it converts the chunky byte per
  13. pixel data to the Amigas planar screen display... The amigas display is
  14. constructed of bitplanes, let me explain:
  15.  
  16.  
  17. the amiga has diffrerent screen modes, OK
  18.  
  19. 2 cols = 1 bitplane
  20. 4 cols =  2 bitplanes
  21. 8 cols = 3 bitplanes
  22. 16 cols = 4 bitplanes
  23. 32 cols = 5 bitplanes
  24. 64 cols = 6 bitplanes
  25. 128 cols = 7 bitplanes
  26. 256 cols = 8 bitplanes
  27.  
  28. now, a bitplane is basically a sheet which for a 320x256 will be 40 bytes X
  29. 256 lines. now 40 bytes X 8 = 320 and a byte contains the 8 bits which
  30. represent a pixel on/off. Now with a 2 colour screen(eg. black and white)
  31. you have 1 bitplane and if you want to set the 2nd pixel on the first line
  32. you would set the first byte as %01000000
  33. Now when you start adding more colours, more bitplanes are added(see table
  34. above) and diffrerent combinations of set bits on the bitplanes will show
  35. different colours on the screen.
  36.  
  37. bitplane 0, first line, first byte:      01000000
  38. bitplane 1,first line first byte:  01000000        now this would show
  39. colour 3 on the 2nd pixel of the top line. (the colours
  40.                range from 0-no of cols) remember
  41.  
  42. i hope that sort of clears things up a little, i`m not very g00d at
  43. explaining things, i left out things like ham mode becoz they just makes
  44. things even more difficult ;-)
  45. My STRONG advice is to not even bother to write your own c2p (not yet
  46. anyway ;-) and use one of the many freely available ones from the PD.  I
  47. use a few at the moment (depending on the situation, one of them uses a 2mb
  48. fastmem buffer, hehe) and i use the Call command to call the compiled
  49. assembler program from a bank. Doing a c2p in AMOS code would be slow and
  50. useless, the c2p HAS to be quick for it to be useful and I doubt ANYBODY
  51. could write a c2p routine in AMOS that could compete with an assembler one
  52. :-)
  53.  
  54. Melee The Student who has just bought an 50mhz FPU for my 50mhz Amiga, and
  55. 18mb, and 850mb 3.5" hardrive, and ide-cd
  56. drive... Anybody got any docs on how to code FPUs ???? (in assembler).
  57.  
  58.  
  59.  
  60.  
  61.  
  62.